FROM java
MAINTAINER Jeff <271833997@qq.com>

ENV LANG=en_US.utf8
ENV TZ=Asia/Shanghai
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

VOLUME /tmp
ARG JAR_FILE
ADD target/broadmax-boot-web.jar app.jar
RUN sh -c 'touch /app.jar'
ENV JAVA_OPTS="-Dfile.encoding=UTF-8 -Djnu.encoding=UTF-8"
ENV JMX_OPTS=""
ENTRYPOINT [ "sh", "-c", "java $JAVA_OPTS $JMX_OPTS -Djava.security.egd=file:/dev/./urandom -jar /app.jar" ]